	
	
	var serviceExpireTable = function(){
		return matchTable('#datatables','/remind/getMakeOverExpirePageData.do',listArr,function(obj){
			obj.memberId = $("#memberId").val();
			obj.cycle = $("#cycle").val();
		},true);
	} 
	
	

$(function(){
	
	
	serviceExpireTable();
	
	getSelectMemberInfo("#memberId");
	
	//查询
	$(".vdrallsearch").on('click',function(){
		serviceExpireTable().draw();
	});
	
	//重置
	$(".resetSearchForm").on('click',function(){
		$("#memberId").html('<option value="">请选择会员</option>').trigger("change");
        $("#excel")[0].reset();
	});
    
  //单击行选中事件
    $('#datatables tbody').on('click', 'tr', function () {
        var table = $('#datatables').DataTable();
        var data = table.row(this).data();
        if ($(this).hasClass('selected')) {
            $(this).removeClass('selected');
            $('#check' + data.id).prop("checked", false);
        } else {
            $(this).addClass('selected');
            $('#check' + data.id).prop("checked", true);
        }
    });
    

    
  //全选事件
    $(".checkall").click(function () {
        var check = $(this).prop("checked");
        $(".checkchild").prop("checked", check);
        var cells = new Array();
        $('#datatables tbody tr').each(function () {
            if (check) {
                $(this).addClass('selected');
            } else {
                $(this).removeClass('selected');
            }
        });
    });
    
    
   
});


